package com.mr.util;

import java.math.BigDecimal;

public class NumberUtil {
	public static double round(double value, int scale,
         int roundingMode) {  
      BigDecimal bd = new BigDecimal(value);  
      bd = bd.setScale(scale, roundingMode);  
      double d = bd.doubleValue();  
      bd = null;  
      return d;  
  } 
}
